home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-21 | 2.4 KB | 75 lines | [TEXT/MPS ] |
- Capability to issue multiple OpenQueues and have
- multipe receives outstanding from within one
- program (task) on the Macintosh.
-
- There can be only one OpenQueue for each program
- that is linked with IPCGlue.o.
-
- The trick to achieve this is to have multiple copies
- of programs linked with IPCGlue.o.
-
- The sources files suppled with this note contain
-
- TestMultiThread.make Make file for TestMultiThread
- TestMultiThread.c MPW Tool to demonstrate MultiThread
- MultiThread.h The header to be used to
- use the MultiThread facility
- MultiThread.a Assembly language program used
- to generate the MultiThread resource
-
-
- Operation:
-
- Make a small program linked with IPCGlue.o that
- will put the addresses of A/ROSE prep routines
- in a table. Put this program in a resource
- called "MultiThread" in user program.
-
- Call CreateQueue to read in this resource and set
- up the Table to access the routines.
-
- Use the pointer to this queue table to acces the
- various routines.
-
- Call DestoryQueue to dispose the table.
-
-
- Table format is:
-
- struct QueueEntry {
- Handle rsrcHandle; // Reserved area
- void (*CloseQueue)(void);
- void (*FreeMsg)(mMessage *msgPtr);
- char (*GetCard)(void);
- unsigned long (*GetETick)(void);
- tid_type (*GetICCTID)(void);
- struct IPCg *(*GetIPCg)(void);
- mMessage *(*GetMsg)(void);
- tid_type (*GetNameTID)(void);
- unsigned short (*GetTickPS)(void);
- tid_type (*GetTID)(void);
- short (*IsLocal)(char *address);
- void (*KillReceive)(void);
- short (*LockRealArea)(void *virtualAddr, unsigned long length,
- struct addressareas buffer[], unsigned long count);
- tid_type (*Lookup_Task)(char *object, char *type, tid_type nm_TID,
- unsigned short *index);
- short (*NetCopy)(tid_type srcTID, void *srcAddress,
- tid_type dstTID, void *dstAddress,
- unsigned long byteCount);
- tid_type (*OpenQueue)(void (*UserProcedure)(void));
- mMessage *(*Receive)(unsigned long mID, tid_type mFrom,
- unsigned short mCode, long timeOut,
- void (*CompletionRoutine)(mMessage *));
- char (*Register_Task)(char object[], char type[], short local_only);
- void (*Send)(mMessage *msgPtr);
- void (*SwapTID)(mMessage *msgPtr);
- void (*UnLockRealArea)(void *virtualAddr, unsigned long length);
- };
-
- To build:
-
- Modify the make file so that the A/ROSE Include files come from
- the right place.
- Build and run the MPW tool.
-